package cn.toolck.minitomcat.start;

import cn.toolck.minitomcat.container.Server;
import cn.toolck.minitomcat.passer.ServerXmlPasser;
import cn.toolck.minitomcat.runner.WorkExecutor;

/**
 * @ClassName Starter_0_4
 * @Description 可以通过server.xml文件配置相应的组件
 * @Author Toolck Rin
 * @Date 2021/3/17 11:39
 * @Version 1.0
 **/
public class Starter_0_4 extends AbstractStarter implements Starter {
    private static final String SERVER_FILE = "server.xml";
    Server server;

    @Override
    public void init() {
        ServerXmlPasser serverXmlPasser = new ServerXmlPasser(SERVER_FILE);
        server = serverXmlPasser.passFile();
    }

    @Override
    public void start() {
        server.start();
    }
}
